﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleData.Infrastructure.Validation;
using System.Diagnostics.Contracts;

namespace SimpleData.ObjectModel
{
	/// <summary>
	/// 
	/// </summary>
	public class DocumentContext
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="doc"></param>
		public DocumentContext( Document doc )
			//: this( doc 
		{
			Contract.Requires<ArgumentNullException>( doc != null, "doc" );

			this.Document = doc;
			this.Data = new Dictionary<string, object>();
		}

		//public DocumentContext( Document doc, DocumentValidationResult result )
		//{
		//    this.Document = doc;
		//    this.Data = new Dictionary<string, object>();

		//    if ( result == null )
		//        this.Result = new DocumentValidationResult( doc );
		//    else
		//        this.Result = result;
		//}

		/// <summary>
		/// 
		/// </summary>
		public Document Document
		{
			get;
			private set;
		}

		/// <summary>
		/// 
		/// </summary>
		public Dictionary<string, object> Data
		{
			get;
			private set;
		}

		//public DocumentValidationResult Result
		//{
		//    get;
		//    private set;
		//}

		
	}
}
